﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:themes="clr-namespace:DropDownButtonLib.Core.Themes"
                    xmlns:chrome="clr-namespace:DropDownButtonLib.Chromes">

    <Style x:Key="{x:Static themes:ResourceKeys.SpinnerButtonStyleKey}" TargetType="RepeatButton">
        <Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" />
        <Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalOuterBorderKey}}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="2,2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid>
                        <chrome:ButtonChrome x:Name="Chrome"
                                             BorderBrush="{TemplateBinding BorderBrush}" 
                                             Background="{TemplateBinding Background}"                                                                  
                                             CornerRadius="{DynamicResource {x:Static themes:ResourceKeys.SpinButtonCornerRadiusKey}}"
                                             RenderEnabled="{TemplateBinding IsEnabled}"
                                             RenderMouseOver="{TemplateBinding IsMouseOver}"
                                             RenderNormal="True"
                                             RenderPressed="{TemplateBinding IsPressed}"
                                             SnapsToDevicePixels="true" />

                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Margin="{TemplateBinding Padding}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
